import busRoutes from './busRoutes'

const appRoutes = [
  ...busRoutes,
  {
    path: '/account',
    component: () => import('pages/Account/Account.vue'),
    children: [
      {
        path: 'login',
        component: () => import('pages/Account/Login/Login.vue')
      },
      {
        path: 'register',
        component: () => import('pages/Account/Register/Register.vue')
      }
    ]
  }
]

// Always leave this as last one
if (process.env.MODE !== 'ssr') {
  appRoutes.push({
    path: '*',
    component: () => import('pages/Error404.vue')
  })
}

export default appRoutes
